<?php
/**
 * Created by PhpStorm.
 * User: DaibiDaddy
 * Date: 2016/5/24
 * Time: 17:14
 */

namespace App\Base;


use App\Base\Form\Article;
use App\Base\Form\Checkbox;
use App\Base\Form\Date;
use App\Base\Form\DateTime;
use App\Base\Form\Entity;
use App\Base\Form\File;
use App\Base\Form\Files;
use App\Base\Form\Hidden;
use App\Base\Form\Pic;
use App\Base\Form\Pics;
use App\Base\Form\Radio;
use App\Base\Form\Select;
use App\Base\Form\SelectInput;
use App\Base\Form\Swicth;
use App\Base\Form\Text;
use App\Base\Form\Textarea;
use App\Base\Form\Time;

class BaseForm
{
    public $data;


    /**
     * @param $name
     * @param $label
     * @return Article
     */
    public function art($name,$label)
    {
       return new Article($name,$label);
    }
    /**
     * @param $name
     * @param $label
     * @return Article
     */
    public function article($name,$label)
    {
       return new Article($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @param $choice
     * @return Checkbox
     */
    public function checkbox($name,$label,$choice)
    {
        return new Checkbox($name,$label,$choice);
    }

    /**
     * @param $name
     * @param $label
     * @param $choice
     * @return Swicth
     */
    public function switch($name,$label,$choice=[])
    {
        return new Swicth($name,$label,$choice);
    }

    /**
     * @param $name
     * @param $label
     * @param $choice
     * @return Radio
     */
    public function radio($name,$label,$choice)
    {
        return new Radio($name,$label,$choice);
    }

    /**
     * @param $name
     * @param $label
     * @param $choice
     * @return Select
     */
    public function select($name,$label,$choice)
    {
        return new Select($name,$label,$choice);
    }

    /**
     * @param $name
     * @param $label
     * @param $choice
     * @return SelectInput
     */
    public function selectinput($name,$label,$choice)
    {
        return new SelectInput($name,$label,$choice);
    }

    /**
     * @param $name
     * @param $label
     * @return Date
     */
    public function date($name,$label)
    {
        return new Date($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return DateTime
     */
    public function datetime($name,$label)
    {
        return new DateTime($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return Time
     */
    public function time($name,$label)
    {
        return new Time($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return File
     */
    public function file($name,$label)
    {
        return new File($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return Files
     */
    public function files($name,$label)
    {
        return new Files($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return Pic
     */
    public function pic($name,$label)
    {
        return new Pic($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return Pics
     */
    public function pics($name,$label)
    {
        return new Pics($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return Text
     */
    public function text($name,$label)
    {
        return new Text($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return Hidden
     */
    public function hidden($name,$label)
    {
        return new Hidden($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @return Textarea
     */
    public function textarea($name,$label)
    {
        return new Textarea($name,$label);
    }

    /**
     * @param $name
     * @param $label
     * @param $choice
     * @return Entity
     */
    public function entity($name,$label,$choice)
    {
        return new Entity($name,$label,$choice);
    }
}
